/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

/include/ "msm8226-camera-sensor-mtp-atlantic3G-rev01.dtsi"
/include/ "dsi_panel_magna_octa_720p_video_kmini3g_01.dtsi"
/include/ "msm8928-kmini-w1.dtsi"
/include/ "msm8228-sec-atlantic3g-battery-data.dtsi"

&rpm_bus {
	rpm-regulator-ldoa15 {
		status = "okay";
		pm8226_l15: regulator-l15 {
			regulator-name = "8226_l15";
			regulator-min-microvolt = <3300000>;
			regulator-max-microvolt = <3300000>;
			qcom,init-voltage = <3300000>;
			status = "okay";
		};
	};
};

&soc {
	serial@f991f000 {
		status = "ok";
	};

	samsung,vibrator{
		compatible = "vibrator";
		samsung,motor-en = <&msmgpio 111 0>;
		status = "ok";
	};

	 /*CONFIG_SND_SOC_MAX98504*/
	qcom,msm-dai-mi2s {
			compatible = "qcom,msm-dai-mi2s";
			qcom,msm-dai-q6-mi2s-tert {
			compatible = "qcom,msm-dai-q6-mi2s";
			qcom,msm-dai-q6-mi2s-dev-id = <2>;
			qcom,msm-mi2s-rx-lines = <2>;
			qcom,msm-mi2s-tx-lines = <1>;
		};
	};



	i2c@15{ /*SM5502 MUIC Chip node */
		/*Driver file: drivers/misc/sm5502.c*/
		/*CONFIG_SM5502_MUIC*/
                cell-index = <15>;
                compatible = "i2c-gpio";
                gpios = <&msmgpio 4 0  /*SDA*/
                        &msmgpio 5 0  /*SCL*/
                        >;
                i2c-gpio,delay-us = <2>;
                #address-cells = <1>;
                #size-cells = <0>;
                sm5502@25{
                        compatible = "sm5502,i2c";
                        reg = <0x25>;
                        interrupt-parent = <&msmgpio>;
                        interrupts= <52 0>;
                        sm5502,irq-gpio = <&msmgpio 52 0x00>;
                        sm5502,gpio-sda = <&msmgpio 4 0x00>;
                        sm5502,gpio-scl = <&msmgpio 5 0x00>;
                        sm5502,uarton-gpio = <&msmgpio 109 0x00>;
                };
        };

	i2c@22 { /*MC96FR332/MC96FR116 IRDA Controller IC node*/
		 /*Drvier file: drivers/irda/ir_remote_kmini.c*/
		 /*CONFIG_IR_REMOCON_KMINI*/
		cell-index = <22>;
                compatible = "i2c-gpio";
                gpios = <&msmgpio 14 0 /* sda */
                         &msmgpio 15 0 /* scl */
                         >;
                i2c-gpio,delay-us = <2>;
                #address-cells = <1>;
                #size-cells = <0>;

		mc96fr332@50 {
			compatible = "mc96fr332,i2c";
                        reg = <0x50>;
                        interrupt-parent = <&msmgpio>;
                        vled_3.3v-supply = <&pm8226_l15>;
                        interrupts = <49 0>;
			mc96fr332,irda_irq_gpio = <&msmgpio 49 0x00>;
                        mc96fr332,irda_wake = <&msmgpio 56 0x00>;
			mc96fr332,irda_poweron = <&msmgpio 1 0x00>;
			mc96fr332,scl-gpio = <&msmgpio 15 0x00>;
			mc96fr332,sda-gpio = <&msmgpio 14 0x00>;
		};

		touchkey@20{
			compatible = "abov,mc96ft16xx";
			reg = <0x20>;
			interrupt-parent = <&msmgpio>;
			interrupts = <31 0>;
			abov,sda-gpio = <&msmgpio 14 0>;
			abov,scl-gpio = <&msmgpio 15 0>;
			abov,irq-gpio = <&msmgpio 31 0>;
			abov,rst-gpio = <&msmgpio 107 0>;
			abov,tkey_en-gpio = <&msmgpio 116 0>;
			vddo-supply = <&pm8226_l6>;
			avdd-supply = <&pm8226_l19>;
		};

		svc_leds@30{
			compatible = "leds,ktd2026";
			reg = <0x30>;
		};
	};


	i2c@f9924000 { /* BLSP1 QUP2 */
		compatible = "qcom,i2c-qup";
		qcom,scl-gpio = <&msmgpio 7 0>;
		qcom,sda-gpio = <&msmgpio 6 0>;
		status = "okay";
		mpu9250@68 {
			compatible = "mpu6515";
			reg = <0x68>;
			interrupt-parent = <&msmgpio>;
			mpu9250,device_rev = <0>;
			mpu9250,irq_gpio = <&msmgpio 64 0x0>;
			mpu9250,int_config = <0>;
			mpu9250,level_shifter = <0>;
			mpu9250,sec_slave_type = <0>;
			mpu9250,sec_slave_id = <0>;
			mpu9250,orientation = <2 1 1 1 2 1 1 1 2>;
			mpu9250,key = <211 22 205 7
				217 186 151 55
				206 254 35 144
				225 102 47 50>;
			mpu9250-lvs1-supply = <&pm8226_lvs1>;
		};

		HSCDTD008@0c {
			compatible = "magnetic,HSCDTD008";
			reg = <0x0c>;
			interrupt-parent = <&msmgpio>;
			interrupts = <66 0>;
			HSCDTD008-i2c,irq_gpio = <&msmgpio 66 0x1>;
			HSCDTD008-i2c,reg_vdd = "8226_l19";
			HSCDTD008-i2c,reg_vio = "8226_lvs1";
		};
	};
	i2c@f9925000 {
		compatible = "qcom,i2c-qup";
		qcom,scl-gpio = <&msmgpio 11 0>;
		qcom,sda-gpio = <&msmgpio 10 0>;
		status = "okay";
		adpd142@64 {
			compatible = "adpd142";
			reg = <0x64>;
			interrupt-parent = <&msmgpio>;
			interrupts = <63 0>;
			adpd142,irq_gpio = <&msmgpio 63 0>;
			adpd142,vdd_1p8 = "8226_l6";
		};
		cm36686@60 {
			compatible = "cm36686";
			reg = <0x60>;
			interrupt-parent = <&msmgpio>;
			interrupts = <65 0>;
			cm36686,irq_gpio = <&msmgpio 65 0x1>;
			cm36686,default_hi_thd = <14>;
			cm36686,default_low_thd = <9>;
			cm36686,cancel_hi_thd = <10>;
			cm36686,cancel_low_thd = <5>;
			reg_vdd-supply = <&pm8226_l19>;
			reg_vio-supply = <&pm8226_lvs1>;
			status = "okay";
		};
	};

	spi@f9928000 {
		compatible = "qcom,spi-qup-v2";
		cell-index = <6>;
		reg = <0xf9928000 0x1000>,
			<0xf9904000 0x19000>;
		reg-names = "spi_physical", "spi_bam_physical";
		interrupt-names = "spi_irq", "spi_bam_irq";
		interrupts = <0 100 0>, <0 238 0>;
		spi-max-frequency = <19200000>;
		#address-cells = <1>;
		#size-cells = <0>;
		qcom,gpio-mosi = <&msmgpio 20 0>;
		qcom,gpio-miso = <&msmgpio 21 0>;
		qcom,gpio-cs0  = <&msmgpio 22 0>;
		qcom,gpio-clk  = <&msmgpio 23 0>;

		qcom,infinite-mode = <0>;
		qcom,use-bam;
		qcom,ver-reg-exists;
		qcom,bam-consumer-pipe-index = <22>;
		qcom,bam-producer-pipe-index = <23>;

		qcom,master-id = <86>;
		vfsspi-spi@0 {
			compatible = "vfsspi,vfs61xx";
			reg = <0>;
			spi-max-frequency = <19200000>;
			vfsspi-sleepPin = <&msmgpio 114 0x00>;
			vfsspi-drdyPin = <&msmgpio 62 0x01>;
			vfsspi-ldoPin = <&pm8226_mpps 4 0x00>;
/*			vfsspi-ocpflag = <&msmgpio 38 0x00>;*/
			vfsspi-ocpen = <&pm8226_gpios 2 0x00>;
			vfsspi-mosipin = <20>;
			vfsspi-misopin = <21>;
			vfsspi-cspin = <22>;
			vfsspi-clkpin = <23>;
			vfsspi-set_altfunc = <1>; /* for spi alternative function number */
			vfsspi-mosi_alt = <1>;
			vfsspi-miso_alt = <1>;
			vfsspi-cs_alt = <1>;
			vfsspi-clk_alt = <1>;
			vfsspi-orient = <1>;
			vfsspi-ldocontrol= <1>;
		};
	};

	i2c@79{
		cell-index = <79>;
		compatible = "i2c-gpio";
		gpios = <&msmgpio 18 0 /* sda */
				 &msmgpio 19 0 /* scl */
				>;
		i2c-gpio,delay-us = <5>;
		cyt_tsp@24 {
				compatible = "cy,cyttsp5_i2c_adapter";
				reg = <0x24>; /*slave address*/
				cy,adapter_id = "cyttsp5_i2c_adapter";
				cy,core {
					cy,name = "cyttsp5_core";
					cy,irq_gpio = <17>;
					cy,hid_desc_register = <1>;
					tsp,avdd-gpio = <&pm8226_gpios 6 0x01>; /*Touch En 1 gpio*/
					vddo-supply = <&pm8226_lvs1>;/*not sure if needed, just in case*/
					cy,mt {
						cy,name = "cyttsp5_mt";
						cy,inp_dev_name = "sec_touchscreen";
						cy,abs =
							/* ABS_MT_POSITION_X, CY_ABS_MIN_X, CY_ABS_MAX_X, 0, 0 */
							<0x35 0 720 0 0
							/* ABS_MT_POSITION_Y, CY_ABS_MIN_Y, CY_ABS_MAX_Y, 0, 0 */
							0x36 0 1280 0 0
							/* ABS_MT_PRESSURE, CY_ABS_MIN_P, CY_ABS_MAX_P, 0, 0 */
							0x3a 0 255 0 0
							/* CY_IGNORE_VALUE, CY_ABS_MIN_W, CY_ABS_MAX_W, 0, 0 */
							0xffff 0 255 0 0
							/* ABS_MT_TRACKING_ID, CY_ABS_MIN_T, CY_ABS_MAX_T, 0, 0 */
							0x39 0 15 0 0
							/* ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0 */
							0x30 0 255 0 0
							/* ABS_MT_TOUCH_MINOR, 0, 255, 0, 0 */
							0x31 0 255 0 0
							/* ABS_MT_ORIENTATION, -128, 127, 0, 0 */
							0x34 0xfffffed7 127 0 0
							/* ABS_MT_TOOL_TYPE, 0, MT_TOOL_MAX, 0, 0 */
							0x37 0 1 0 0>;
					};
				};
			};
	};

	gpio_keys {
		compatible = "gpio-keys";
		input-name = "gpio-keys";
		vddo-supply = <&pm8226_l6>;
		vddo-voltage = <1800>;


		home_key {
			label = "home_key";
			gpios = <&msmgpio 108 0x1>;
			linux,input-type = <1>;
			linux,code = <172>;
			gpio-key,wakeup;
			debounce-interval = <15>;
		};
/*
		vol_down {
			label = "volume_down";
			gpios = <&msmgpio 107 0x1>;
			linux,input-type = <1>;
			linux,code = <114>;
			gpio-key,wakeup;
			debounce-interval = <15>;
		};
*/
		vol_up {
			label = "volume_up";
			gpios = <&msmgpio 106 0x1>;
			linux,input-type = <1>;
			linux,code = <115>;
			gpio-key,wakeup;
			debounce-interval = <15>;
		};

		hall_flip {
			interrupt-parent = <&msmgpio>;
			interrupts = <50 0>;

			label = "hall_flip";
			gpios = <&msmgpio 50 0>;
			linux,input-type = <1>;
			linux,code = <0x15>;
			gpio-key,wakeup;
			debounce-interval = <15>;
		};
	};

	alps {
			compatible = "alps-input";
			alps,mag-position = <3>;
	};

	sound {
		qcom,audio-routing =
			"RX_BIAS", "MCLK",
			"LDO_H", "MCLK",
			"SPK_OUT", "MCLK",
			"SPK_OUT", "EXT_VDD_SPKR",
			"AMIC1", "MIC BIAS1 External",
			"MIC BIAS1 External", "Handset Mic",
			"AMIC2", "MIC BIAS2 External",
			"MIC BIAS2 External", "Headset Mic",
			"AMIC3", "MIC BIAS1 External",
			"MIC BIAS1 External", "Sub Mic",
			"AMIC4", "MIC BIAS2 External",
			"MIC BIAS2 External", "ANCRight Headset Mic",
			"AMIC5", "MIC BIAS2 External",
			"MIC BIAS2 External", "ANCLeft Headset Mic";

		qcom,cdc-mclk-gpios = <&pm8226_gpios 1 0>;
		/*qcom,cdc-vdd-spkr-gpios = <&pm8226_gpios 2 0>;*/
		vdd-earjack-supply = <&pm8226_l19>;
	};
	memory_hole: qcom,msm-mem-hole {
                compatible = "qcom,msm-mem-hole";
                qcom,memblock-remove = <0x08400000 0x2f00000 /* MODEM */
                                        0x0c300000 0x100000 /* MBA */
                                        0x0ca00000 0x2c00000 /* Reserve 8MB for TZ apps,7 MB for WCNSS, 29 MB for ADSP + VENUS*/
                                        0x0fa00000 0x500000 /* Address and Size of Hole */
                                        0x10000000 0x600000>; /* Reserve 6MB for TIMA logging */
        };

	qcom,qseecom@d980000 {
		compatible = "qcom,qseecom";
		reg = <0x0ca00000 0x800000>;
		reg-names = "secapp-region";
		qcom,disk-encrypt-pipe-pair = <2>;
		qcom,hlos-ce-hw-instance = <0>;
		qcom,qsee-ce-hw-instance = <0>;
		qcom,support-bus-scaling;
		qcom,msm-bus,name = "qseecom-noc";
		qcom,msm-bus,num-cases = <4>;
		/* qcom,msm-bus,active-only = <0>; */
		qcom,msm-bus,num-paths = <1>;
		qcom,msm-bus,vectors-KBps =
				<55 512 0 0>,
				<55 512 0 0>,
				<55 512 120000 1200000>,
				<55 512 393600 3936000>;
	};
};

&usb_otg {
	#address-cells = <0>;
	interrupt-parent = <&usb_otg>;
	interrupts = <0 1 2>;
	#interrupt-cells = <1>;
	interrupt-map-mask = <0xffffffff>;
	interrupt-map = <0 &intc 0 134 0
			1 &intc 0 140 0
			2 &spmi_bus 0x0 0x0 0x9 0x0>;
	interrupt-names = "core_irq", "async_irq", "pmic_id_irq";

	qcom,hsusb-otg-mode = <1>;
	vbus_otg-supply = <&pm8226_chg_otg>;
	qcom,hsusb-otg-phy-init-seq =
			<0x44 0x80 0x7A 0x81 0x24 0x82 0x13 0x83 0xffffffff>;
};

&sdcc1 {
	vdd-supply = <&pm8226_l17>;
	qcom,vdd-voltage-level = <2950000 2950000>;
	qcom,vdd-current-level = <800 500000>;

	vdd-io-supply = <&pm8226_l6>;
	qcom,vdd-io-always-on;
	qcom,vdd-io-voltage-level = <1800000 1800000>;
	qcom,vdd-io-current-level = <250 154000>;

	qcom,pad-pull-on = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-pull-off = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-drv-on = <0x4 0x4 0x4>; /* 10mA, 10mA, 10mA */
	qcom,pad-drv-off = <0x0 0x0 0x0>; /* 2mA, 2mA, 2mA */

	qcom,clk-rates = <400000 25000000 50000000 100000000 200000000>;
	qcom,sup-voltages = <2950 2950>;

	qcom,bus-speed-mode = "HS200_1p8v", "DDR_1p8v";
	qcom,nonremovable;

	status = "disabled";
};

&sdhc_1 {
	vdd-supply = <&pm8226_l17>;
	qcom,vdd-always-on;
	qcom,vdd-voltage-level = <2950000 2950000>;
	qcom,vdd-current-level = <800 500000>;

	vdd-io-supply = <&pm8226_l6>;
	qcom,vdd-io-always-on;
	qcom,vdd-io-voltage-level = <1800000 1800000>;
	qcom,vdd-io-current-level = <250 154000>;

	qcom,pad-pull-on = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-pull-off = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-drv-on = <0x4 0x4 0x4>; /* 10mA, 10mA, 10mA */
	qcom,pad-drv-off = <0x0 0x0 0x0>; /* 2mA, 2mA, 2mA */

	qcom,clk-rates = <400000 25000000 50000000 100000000 200000000>;
	qcom,bus-speed-mode = "HS200_1p8v", "DDR_1p8v";
	qcom,nonremovable;

	status = "ok";
};

&sdcc2 {
	vdd-supply = <&pm8226_l18>;
	qcom,vdd-voltage-level = <2950000 2950000>;
	qcom,vdd-current-level = <9000 800000>;

	vdd-io-supply = <&pm8226_l21>;
	qcom,vdd-io-voltage-level = <1800000 2950000>;
	qcom,vdd-io-current-level = <6 22000>;

	qcom,pad-pull-on = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-pull-off = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-drv-on = <0x4 0x4 0x4>; /* 10mA, 10mA, 10mA */
	qcom,pad-drv-off = <0x0 0x0 0x0>; /* 2mA, 2mA, 2mA */

	qcom,clk-rates = <400000 25000000 50000000 100000000 200000000>;
	qcom,sup-voltages = <2950 2950>;

	qcom,xpc;
	qcom,bus-speed-mode = "SDR12", "SDR25", "SDR50", "DDR50", "SDR104";
	qcom,current-limit = <600>; #address-cells = <0>; interrupt-parent = <&sdcc2>;
	interrupts = <0 1 2>;
	#interrupt-cells = <1>;
	interrupt-map-mask = <0xffffffff>;
	interrupt-map = <0 &intc 0 125 0
			1 &intc 0 220 0
			2 &msmgpio 38 0x3>;
	interrupt-names = "core_irq", "bam_irq", "status_irq";
	cd-gpios = <&msmgpio 38 0x1>;

	status = "disabled";
};

&sdhc_2 {
	vdd-supply = <&pm8226_l18>;
	qcom,vdd-voltage-level = <2950000 2950000>;
	qcom,vdd-current-level = <9000 800000>;

	vdd-io-supply = <&pm8226_l21>;
	qcom,vdd-io-voltage-level = <1800000 2950000>;
	qcom,vdd-io-current-level = <6 22000>;

	qcom,pad-pull-on = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-pull-off = <0x0 0x3 0x3>; /* no-pull, pull-up, pull-up */
	qcom,pad-drv-on = <0x4 0x4 0x4>; /* 10mA, 10mA, 10mA */
	qcom,pad-drv-off = <0x0 0x0 0x0>; /* 2mA, 2mA, 2mA */

	qcom,clk-rates = <400000 25000000 50000000 100000000 200000000>;

	#address-cells = <0>;
	interrupt-parent = <&sdhc_2>;
	interrupts = <0 1 2>;
	#interrupt-cells = <1>;
	interrupt-map-mask = <0xffffffff>;
	interrupt-map = <0 &intc 0 125 0
			1 &intc 0 221 0
			2 &msmgpio 38 0x3>;
	interrupt-names = "hc_irq", "pwr_irq", "status_irq";

	status = "ok";
};

&spmi_bus {
	qcom,pm8226@0 {
		qcom,power-on@800 {
			compatible = "qcom,qpnp-power-on";
			reg = <0x800 0x100>;
			interrupts = <0x0 0x8 0x0>,
				     <0x0 0x8 0x1>,
				     <0x0 0x8 0x4>,
				     <0x0 0x8 0x5>;
			interrupt-names = "kpdpwr", "resin",
					"resin-bark", "kpdpwr-resin-bark";
			qcom,pon-dbc-delay = <15625>;
			qcom,system-reset;
			qcom,s3-debounce = <128>;

			qcom,pon_1 {
				qcom,pon-type = <0>;
				qcom,pull-up = <1>;
				linux,code = <116>;
				qcom,disable-reset = <1>;
				qcom,s1-timer = <6720>;
				qcom,s2-timer = <1000>;
				qcom,s2-type = <7>;
			};

			qcom,pon_2 {
				qcom,pon-type = <1>;
				qcom,pull-up = <1>;
				linux,code = <114>;
				qcom,disable-reset = <1>;
				qcom,s1-timer = <6720>;
				qcom,s2-timer = <2000>;
				qcom,s2-type = <7>;
			};

			qcom,pon_3 {
				qcom,pon-type = <3>;
				qcom,support-reset = <1>;
				qcom,pull-up = <1>;
				qcom,s1-timer = <10256>;
				qcom,s2-timer = <1000>;
				qcom,s2-type = <7>;
				qcom,use-bark;
			};
		};
	};
	qcom,pm8226@1 {
                qcom,leds@d300 {
                        status = "okay";
                };

		qcom,leds@d800 {
			status = "disabled"; /*If WLED is not used for Backlight control*/
			qcom,wled_0 {		/*for TFT Panel, this to be disabled */
				label = "wled";
				linux,name = "wled:backlight";
				linux,default-trigger = "bkl-trigger";
				qcom,cs-out-en;
				qcom,op-fdbck = <1>;
				qcom,default-state = "off";
				qcom,max-current = <20>;
				qcom,ctrl-delay-us = <0>;
				qcom,boost-curr-lim = <3>;
				qcom,cp-sel = <0>;
				qcom,switch-freq = <11>;
				qcom,ovp-val = <0>;
				qcom,num-strings = <1>;
				qcom,id = <0>;
			};
		};
	};
};

&pm8226_gpios {
	gpio@c000 { /* GPIO 1 */
		/* XO_PMIC_CDC_MCLK enable for tapan codec */
		qcom,mode = <1>;		/* Digital output */
		qcom,output-type = <0>;	/* CMOS logic */
		qcom,pull = <5>;		/* QPNP_PIN_PULL_NO*/
		qcom,vin-sel = <3>;		/* QPNP_PIN_VIN3 */
		qcom,out-strength = <3>;/* QPNP_PIN_OUT_STRENGTH_HIGH */
		qcom,src-sel = <2>;		/* QPNP_PIN_SEL_FUNC_1 */
		qcom,master-en = <1>;	/* Enable GPIO */
	};

	gpio@c100 { /* GPIO 2 */
		qcom,mode = <1>;
		qcom,output-type = <0>;
		qcom,pull = <5>;
		qcom,vin-sel = <3>;
		qcom,out-strength = <3>;
		qcom,src-sel = <0>;
		qcom,master-en = <1>;
	};

	gpio@c200 { /* GPIO 3 */
		qcom,mode = <0>;
		qcom,pull = <4>;
		qcom,vin-sel = <2>;
		qcom,src-sel = <0>;
		qcom,master-en = <1>;
	};

	gpio@c300 { /* GPIO 4 */
	};

	gpio@c400 { /* GPIO 5 */
		qcom,mode = <1>;		/* Digital output */
		qcom,output-type = <0>;	/* CMOS logic */
		qcom,pull = <5>;		/* QPNP_PIN_PULL_NO */
		qcom,vin-sel = <3>;		/* QPNP_PIN_VIN2 */
		qcom,out-strength = <3>;/* QPNP_PIN_OUT_STRENGTH_HIGH */
		qcom,src-sel = <2>;		/* QPNP_PIN_SEL_FUNC_1 */
		qcom,master-en = <1>;
	};

	gpio@c500 { /* GPIO 6 */
		qcom,mode = <1>;                /* Digital output */
                qcom,output-type = <0>; /* CMOS logic */
                qcom,pull = <5>;                /* QPNP_PIN_PULL_NO */
                qcom,vin-sel = <3>;             /* QPNP_PIN_VIN2 */
                qcom,out-strength = <3>;/* QPNP_PIN_OUT_STRENGTH_HIGH */
		qcom,master-en = <1>;
	};

	gpio@c600 { /* GPIO 7 */
	};

	gpio@c700 { /* GPIO 8 */
		reg = <0xc700 0x100>;
		qcom,pin-num = <8>;
		qcom,mode = <1>;		/* QPNP_PIN_MODE_DIG_OUT */
		qcom,output-type = <0>;		/* QPNP_PIN_OUT_BUF_CMOS */
		qcom,invert = <0>;		/* QPNP_PIN_INVERT_DISABLE */
		qcom,pull = <5>;		/* QPNP_PIN_PULL_NO */
		qcom,vin-sel = <2>;		/* QPNP_PIN_VIN2 = S3 = 1.8V */
		qcom,out-strength = <2>;	/* QPNP_PIN_OUT_STRENGTH_MED */
		qcom,src-sel = <0>;		/* QPNP_PIN_SEL_FUNC_CONSTANT */
		qcom,master-en = <1>;		/* enable this gpio */
	};
};

&pm8226_mpps {
	mpp@a000 { /* MPP 1 */
	};

	mpp@a100 { /* MPP 2 */
	};

	mpp@a200 { /* MPP 3 */
	};

	mpp@a300 { /* MPP 4 */
		qcom,mode = <1>; /*QPNP_PIN_MODE_DIG_OUT */
		qcom,invert = <1>; /* Enable MPP */
		qcom,out-strength = <3>; /*QPNP_PIN_OUT_STRENGTH_HIGH*/
		qcom,master-en = <1>;
		qcom,src-sel = <0>; /* Function constant */
		qcom,vin-sel = <3>; /* QPNP_PIN_VIN3, 1.8V */
	};

	mpp@a400 { /* MPP 5 */
		/* PA_THERM0 config */
		qcom,mode = <4>; /* AIN input */
		qcom,invert = <1>; /* Enable MPP */
		qcom,ain-route = <0>; /* AMUX 5 */
		qcom,master-en = <1>;
		qcom,src-sel = <0>; /* Function constant */
	};

	mpp@a500 { /* MPP 6 */
		qcom,mode = <4>; /* AIN input */
		qcom,invert = <1>; /* Enable MPP */
		qcom,ain-route = <1>; /* AMUX 6 */
		qcom,master-en = <1>;
		qcom,src-sel = <0>; /* Function constant */
	};

	mpp@a600 { /* MPP 7 */
	};

	mpp@a700 { /* MPP 8 */
		/* PA_THERM1 config */
		qcom,mode = <4>; /* AIN input */
		qcom,invert = <1>; /* Enable MPP */
		qcom,ain-route = <3>; /* AMUX 8 */
		qcom,master-en = <1>;
		qcom,src-sel = <0>; /* Function constant */
	};
};

&pm8226_vadc {
	chan@14 {
		label = "pa_therm0";
		reg = <0x14>;
		qcom,decimation = <0>;
		qcom,pre-div-channel-scaling = <0>;
		qcom,calibration-type = "ratiometric";
		qcom,scale-function = <2>;
		qcom,hw-settle-time = <2>;
		qcom,fast-avg-setup = <0>;
	};

	chan@15 {
		label = "mpp6_div1";
		reg = <0x15>;
		qcom,decimation = <0>;
		qcom,pre-div-channel-scaling = <0>;
		qcom,calibration-type = "absolute";
		qcom,scale-function = <0>;
		qcom,hw-settle-time = <0>;
		qcom,fast-avg-setup = <0>;
	};
	chan@17 {
		label = "pa_therm1";
		reg = <0x17>;
		qcom,decimation = <0>;
		qcom,pre-div-channel-scaling = <0>;
		qcom,calibration-type = "ratiometric";
		qcom,scale-function = <2>;
		qcom,hw-settle-time = <2>;
		qcom,fast-avg-setup = <0>;
	};

	chan@27 {
		label = "mpp8_div3";
		reg = <0x27>;
		qcom,decimation = <0>;
		qcom,pre-div-channel-scaling = <1>;
		qcom,calibration-type = "absolute";
		qcom,scale-function = <0>;
		qcom,hw-settle-time = <0>;
		qcom,fast-avg-setup = <0>;
		};
};

/ {
	mtp_batterydata: qcom,battery-data {
		qcom,rpull-up-kohm = <100>;
		qcom,vref-batt-therm = <1800000>;

		/include/ "batterydata-palladium.dtsi"
		/include/ "batterydata-mtp-3000mah.dtsi"
	};
};

&pm8226_bms {
	status = "ok";
	qcom,enable-fcc-learning;
	qcom,min-fcc-learning-soc = <20>;
	qcom,min-fcc-ocv-pc = <30>;
	qcom,min-fcc-learning-samples = <5>;
	qcom,fcc-resolution = <10>;
	qcom,battery-data = <&mtp_batterydata>;
};

&pm8226_chg {
	qcom,battery-data = <&mtp_batterydata>;
	qcom,vddmax-mv = <4400>;
	qcom,vddsafe-mv = <4400>;
};

&rpm_bus {
	rpm-regulator-ldoa5 {
		status = "okay";
		pm8226_l5: regulator-l5 {
			regulator-name = "8226_l5";
			regulator-min-microvolt = <1100000>;
			regulator-max-microvolt = <1200000>;
			qcom,init-voltage = <1100000>;
			status = "okay";
		};
	};
};

&slim_msm {
	tapan_codec {
		qcom,cdc-reset-gpio = <&msmgpio 36 0>;
		qcom,cdc-micbias1-ext-cap;
		qcom,cdc-micbias-cfilt1-mv = <2800>;
		qcom,cdc-micbias-cfilt2-mv = <2800>;
		qcom,cdc-micbias-cfilt3-mv = <2800>;
	};
	es325_gen_slim {
                compatible = "es325-gen";
                elemental-addr = [00 01 02 00 BE 02];

                es325-reset-gpio = <&msmgpio 55 0>;
                es325-wakeup-gpio = <&msmgpio 53 0>;
                vdd-2mic-core-supply = <&pm8226_l5>;

                es325-slim-ifd = "es325-ifd";
                es325-slim-ifd-elemental-addr = [00 00 02 00 BE 02];
        };

};

&mdss_mdp {
	qcom,mdss-pref-prim-intf = "dsi";
};

&mdss_dsi0 {
	qcom,dsi-pref-prim-pan = <&dsi_magna_octa_720p_video_atlantic3g>;
};
